Getting Started
Creating a New Widget
Use the Nx generator to scaffold a new widget:
Bash
nx generate @cdx-extensions/widget-template-web:widget <widget-name>
This creates a new app under widgets/web/ with the required Module Federation configuration. Only modify files inside src/app/ for your widget logic and UI.
| File / Folder | Can you edit? | Notes |
|---|---|---|
src/app/ | Yes | All your widget UI and business logic goes here |
src/environments/ | Yes | Set apiUrl and feature flags per environment |
src/assets/ | Yes | Add images, fonts, static files |
module-federation.config.ts | Partially | Only change name and exposes |
project.json | Partially | Only change port under serve / serve-static |
webpack.config.ts | No | Required for Module Federation — any change breaks loading in OLB |
bootstrap.tsx / main.ts | No | Required async boundary for Module Federation |
tsconfig*.json / jest.config.ts | No | Required for build and test tooling |
Next Steps
Web development guides:
- SDK Reference — SDK packages, methods, and usage
- Platform Capabilities (Local) — How local development works with mock data
- OLB Integration — Module Federation, registration, and deployment